package Event.lib;

import Creature.Player;
import Event.Story;

public class Packageupgrade extends Story {
    int random = (int) (Math.random() * 10);

    public Packageupgrade(Player player) {
        super(player);

        eventName = "手机套餐升级";
        happenText = "手机运营商打你电话告诉你有免费的升级套餐，你是否接受？";
        options = new String[]{"接受", "拒绝"};
    }


    @Override
    public void eventHappen(int option) {
        switch (option) {
            case 0:
                endText = "结果你的手机套餐升级了，这个月多付了50快钱";
                player.setMoney(player.getMoney() - 50);

                break;
            case 1:
                endText = "你以为拒绝了就不会收费了吗？";
                player.setMoney(player.getMoney() - 50);
                break;
        }

    }

    @Override
    public boolean canHappen(Player player) {
        return true;
    }
}
